gdkwindow-wayland: Obey Wayland buffer semantics
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 3 Feb 2014 23:45:32 +0000 (18:45 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 4 Feb 2014 00:08:45 +0000 (19:08 -0500)
commit8061df15441910037be4ef633744f1bfb52efff5
treebd62ff39c8ba40eb2ffd83c257f6d1eb1045d13d
parent04b58bcf3e87e2495f810449d717e86a0f0a3171
gdkwindow-wayland: Obey Wayland buffer semantics

We can't destroy buffers if they're in-use by the compositor. Well,
technically we can, but that is considered undefined by Wayland and
mutter won't cope with it very well -- it simply kills the client.

To solve this, we need to delay the destroy operation until the
compositor tells us that it's released the buffer. To do this, hold
an extra ref on the cairo surface as long as the surface is in-use
by the compositor.
gdk/wayland/gdkwindow-wayland.c